module.exports = function main(length,minutes) {
    let result;
    if(length <= 2){
        result = Math.round(6 + minutes * 0.25);
    }
    else if(length <= 8){
        result = Math.round(6 + (length - 2) * 0.8 + minutes * 0.25);
    }
    else {
        result = Math.round(6 + (8 - 2) * 0.8 + (length - 8) * 1.2 + minutes * 0.25);
    }
    return result;
};